package com.so206.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class AlipayTradeRecord implements Serializable {
    private Long id;

    /**
     * 费率
     */
    private BigDecimal sett;

    /**
     * 交易手续费
     */
    private BigDecimal settChange;

    /**
     * 订单号
     */
    private String outOrderId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date optTime;

    /**
     * 收款账户
     */
    private String trName;

    /**
     * 收款账号
     */
    private String trAccount;

    /**
     * 转款备注
     */
    private String trDesc;

    /**
     * 转账金额
     */
    private BigDecimal trMoney;

    /**
     * 转账单号
     */
    private String tradeNo;

    /**
     * 状态:0.失败,1.成功
     */
    private Integer status;

    /**
     * 返回状态码
     */
    private String tradeStatus;

    /**
     * 错误信息
     */
    private String errInfo;

    /**
     * 原通道id
     */
    private Long connId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public BigDecimal getSett() {
        return sett;
    }

    public void setSett(BigDecimal sett) {
        this.sett = sett;
    }

    public BigDecimal getSettChange() {
        return settChange;
    }

    public void setSettChange(BigDecimal settChange) {
        this.settChange = settChange;
    }

    public String getOutOrderId() {
        return outOrderId;
    }

    public void setOutOrderId(String outOrderId) {
        this.outOrderId = outOrderId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getOptTime() {
        return optTime;
    }

    public void setOptTime(Date optTime) {
        this.optTime = optTime;
    }

    public String getTrName() {
        return trName;
    }

    public void setTrName(String trName) {
        this.trName = trName;
    }

    public String getTrAccount() {
        return trAccount;
    }

    public void setTrAccount(String trAccount) {
        this.trAccount = trAccount;
    }

    public String getTrDesc() {
        return trDesc;
    }

    public void setTrDesc(String trDesc) {
        this.trDesc = trDesc;
    }

    public BigDecimal getTrMoney() {
        return trMoney;
    }

    public void setTrMoney(BigDecimal trMoney) {
        this.trMoney = trMoney;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(String tradeStatus) {
        this.tradeStatus = tradeStatus;
    }

    public String getErrInfo() {
        return errInfo;
    }

    public void setErrInfo(String errInfo) {
        this.errInfo = errInfo;
    }

    public Long getConnId() {
        return connId;
    }

    public void setConnId(Long connId) {
        this.connId = connId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sett=").append(sett);
        sb.append(", settChange=").append(settChange);
        sb.append(", outOrderId=").append(outOrderId);
        sb.append(", createTime=").append(createTime);
        sb.append(", optTime=").append(optTime);
        sb.append(", trName=").append(trName);
        sb.append(", trAccount=").append(trAccount);
        sb.append(", trDesc=").append(trDesc);
        sb.append(", trMoney=").append(trMoney);
        sb.append(", tradeNo=").append(tradeNo);
        sb.append(", status=").append(status);
        sb.append(", tradeStatus=").append(tradeStatus);
        sb.append(", errInfo=").append(errInfo);
        sb.append(", connId=").append(connId);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AlipayTradeRecord other = (AlipayTradeRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getSett() == null ? other.getSett() == null : this.getSett().equals(other.getSett()))
                && (this.getSettChange() == null ? other.getSettChange() == null : this.getSettChange().equals(other.getSettChange()))
                && (this.getOutOrderId() == null ? other.getOutOrderId() == null : this.getOutOrderId().equals(other.getOutOrderId()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getOptTime() == null ? other.getOptTime() == null : this.getOptTime().equals(other.getOptTime()))
                && (this.getTrName() == null ? other.getTrName() == null : this.getTrName().equals(other.getTrName()))
                && (this.getTrAccount() == null ? other.getTrAccount() == null : this.getTrAccount().equals(other.getTrAccount()))
                && (this.getTrDesc() == null ? other.getTrDesc() == null : this.getTrDesc().equals(other.getTrDesc()))
                && (this.getTrMoney() == null ? other.getTrMoney() == null : this.getTrMoney().equals(other.getTrMoney()))
                && (this.getTradeNo() == null ? other.getTradeNo() == null : this.getTradeNo().equals(other.getTradeNo()))
                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
                && (this.getTradeStatus() == null ? other.getTradeStatus() == null : this.getTradeStatus().equals(other.getTradeStatus()))
                && (this.getErrInfo() == null ? other.getErrInfo() == null : this.getErrInfo().equals(other.getErrInfo()))
                && (this.getConnId() == null ? other.getConnId() == null : this.getConnId().equals(other.getConnId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSett() == null) ? 0 : getSett().hashCode());
        result = prime * result + ((getSettChange() == null) ? 0 : getSettChange().hashCode());
        result = prime * result + ((getOutOrderId() == null) ? 0 : getOutOrderId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getOptTime() == null) ? 0 : getOptTime().hashCode());
        result = prime * result + ((getTrName() == null) ? 0 : getTrName().hashCode());
        result = prime * result + ((getTrAccount() == null) ? 0 : getTrAccount().hashCode());
        result = prime * result + ((getTrDesc() == null) ? 0 : getTrDesc().hashCode());
        result = prime * result + ((getTrMoney() == null) ? 0 : getTrMoney().hashCode());
        result = prime * result + ((getTradeNo() == null) ? 0 : getTradeNo().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTradeStatus() == null) ? 0 : getTradeStatus().hashCode());
        result = prime * result + ((getErrInfo() == null) ? 0 : getErrInfo().hashCode());
        result = prime * result + ((getConnId() == null) ? 0 : getConnId().hashCode());
        return result;
    }
}